Package-level declarations

DSL for working with custom types (e.g. Outcome)

val outcome1: Outcome<String, Int> = Present(1)
val outcome2: Outcome<String, Int> = Present(2)
outcome {
val a = outcome1.bind()
val b = outcome2.bind()
a + b
}

Types

Link copied to clipboard
class OutcomeOfRaise(raise: Raise<Any?>) : Raise<Throwable>

Emulation of context receivers, when they're released this can be replaced by context receiver based code in Arrow itself.

Link copied to clipboard
class OutcomeRaise<E>(raise: Raise<Any?>) : Raise<E>

Emulation of context receivers, when they're released this can be replaced by context receiver based code in Arrow itself.

Functions

Link copied to clipboard
inline fun <E, A> outcome(block: OutcomeRaise<E>.() -> A): Outcome<E, A>

DSL build on top of Arrow's Raise for Outcome.

Link copied to clipboard
inline fun <A> outcomeOf(block: OutcomeOfRaise.() -> A): OutcomeOf<A>

DSL build on top of Arrow's Raise for OutcomeOf.